(function() {
    let product = document.querySelector('#product')
    let url = location.href;

let {productid} = getUrlParams(url);

/* console.log(param); */

fetch(`http://chst.vip:1234/api/getmoneyctrlproduct?productid=${productid}`)
.then(body=>body.json())
.then(res => {
    /* console.log(res); */
    let result = res.result[0]
    html = `
        <div class="biaoti">
        <h4>${result.productName}</h4>
        </div>
        <div class="other">
        <span>${result.productFrom} | ${result.productTime}</span>
        <i>${result.productTips}</i>
    </div>
    <div class="container">
        <p>
            ${result.productImg2}
            ${result.productInfo2}
        </p>
    </div>
    <div class="bigimg">
            ${result.productImg2}
    </div>
    <div class="city">
            ${result.productCity}
    <div class="buy">
        <a href="#">前往购买</a>
    </div>
    <div class="erweima">
        <img src="./assets/images/mmbweixin2.png" alt="">
    </div>
    <div class="textarea">
        <div class="empty">
            <a href="">提交评论</a>
        </div>
    </div>
    <div class="comment">
        <div class="name">
           ${result.productComment}
        </div>
    </div>
    <div class="more">
        <a href="">更多优惠信息>></a>
    </div>
    <div class="chart ">
        <span>品牌排行</span>
        <i><img src="./assets/images/more.png" alt=""></i>
    </div>
    <div class="footer">
        <a href="#" class="denglu">登录</a>
        <a href="#" class="zhuce">注册</a>
        <a href="#" class="fanhui">返回顶部</a>
    </div>
</div>
    `
    product.innerHTML = html;
})


})()